<template>
  <div class="statistics-page">
    <!-- 页面标题 -->
    <div class="page-header">
      <h1>数据统计</h1>
      <p>分析档案利用情况，优化管理策略</p>
    </div>

    <!-- 统计卡片 -->
    <div class="stats-cards">
      <!-- 馆藏统计 -->
      <div class="stat-card">
        <div class="card-header">
          <h3><i class="el-icon-folder"></i> 馆藏统计</h3>
        </div>


      </div>

      <!-- 利用统计 -->
      <div class="stat-card">

      </div>

      <!-- 最近活动 -->
      <div class="stat-card">
        <div class="card-header">
          <h3><i class="el-icon-time"></i> 最近活动</h3>
        </div>

      </div>
    </div>

    <!-- 分类统计图表 -->
    <div class="chart-section">
      <div class="chart-controls">
        <label>选择分类类型:</label>

      </div>
      
      <div class="chart-container">
        <h4>档案 名称 分布图</h4>

      </div>
    </div>


</script>

<style scoped>
.statistics-page {
  padding: 0;
}

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 8px;
}

.page-header h1 {
  font-size: 28px;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.page-header p {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 16px;
  margin: 0;
  color: #333;
  display: flex;
  align-items: center;
}

.card-header h3 i {
  margin-right: 8px;
  color: #409eff;
}

.stat-item {
  margin-bottom: 15px;
}

.stat-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.stat-bar {
  height: 6px;
  background-color: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.stat-progress {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.usage-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.usage-item {
  text-align: center;
  flex: 1;
}

.usage-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.usage-icon i {
  font-size: 18px;
  color: #409eff;
}

.usage-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.usage-value {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.chart-placeholder {
  height: 120px;
  background-color: #f8f9fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.activity-icon i {
  font-size: 14px;
  color: #409eff;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: #999;
}

.chart-section {
  margin-top: 20px;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-controls {
  margin-bottom: 20px;
}

.chart-controls label {
  font-size: 14px;
  color: #333;
  margin-right: 10px;
}

.chart-container {
  height: 300px;
}

.pie-chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.pie-chart-container {
  width: 300px;
  height: 300px;
  margin-bottom: 20px;
}

.pie-chart-svg {
  width: 100%;
  height: 100%;
}

.pie-slice {
  stroke: #fff;
  stroke-width: 2;
  transition: opacity 0.3s ease;
}

.pie-slice:hover {
  opacity: 0.8;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.legend-item {
  display: flex;
  align-items: center;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  margin-right: 8px;
}

.legend-item span {
  font-size: 14px;
  color: #333;
}

.detail-section {
  margin-top: 20px;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.detail-header h3 {
  font-size: 16px;
  margin: 0;
  color: #333;
}

.detail-controls {
  display: flex;
  align-items: center;
}

.detail-controls .el-input {
  margin-right: 10px;
}

.detail-controls .el-date-picker {
  margin-right: 10px;
}

.detail-controls .el-button {
  margin-left: 10px;
}
</style> 